home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / cmds.fmt / ctags.man < prev    next >
Encoding:
Text File  |  1989-05-23  |  5.6 KB  |  199 lines

  1.  
  2.  
  3.  
  4. CTAGS                     User Commands                     CTAGS
  5.  
  6.  
  7.  
  8. NNAAMMEE
  9.      ctags - create a tags file
  10.  
  11. SSYYNNOOPPSSIISS
  12.      ccttaaggss [ --BBFFaaddttuuwwvvxx ] [ --ff _t_a_g_s_f_i_l_e ] name ...
  13.  
  14. DDEESSCCRRIIPPTTIIOONN
  15.      _C_t_a_g_s makes a tags file for _e_x(1) from the specified C, Pas-
  16.      cal, Fortran, YACC, lex, and lisp sources.  A tags file
  17.      gives the locations of specified objects in a group of
  18.      files.  Each line of the tags file contains the object name,
  19.      the file in which it is defined, and a search pattern for
  20.      the object definition, separated by white-space.  Using the
  21.      _t_a_g_s file, _e_x(1) can quickly locate these object defini-
  22.      tions.  Depending on the options provided to _c_t_a_g_s, objects
  23.      will consist of subroutines, typedefs, defines, structs,
  24.      enums and unions.
  25.  
  26.      Yacc and lex files each have a special tag.  _Y_y_p_a_r_s_e is the
  27.      start of the second section of the yacc file, and _y_y_l_e_x is
  28.      the start of the second section of the lex file.
  29.  
  30.      If the --xx flag is given, _c_t_a_g_s produces a list of object
  31.      names, the line number and file name on which each is
  32.      defined, as well as the text of that line and prints this on
  33.      the standard output.  This is a simple index which can be
  34.      printed out as an off-line readable function index.
  35.  
  36.      If the --vv flag is given, an index of the form expected by
  37.      _v_g_r_i_n_d(1) is produced on the standard output.  This listing
  38.      contains the object name, file name, and page number (assum-
  39.      ing 64 line pages).  Since the output will be sorted into
  40.      lexicographic order, it may be desired to run the output
  41.      through ssoorrtt --ff.  Sample use:
  42.           ctags -v files | sort -f > index
  43.           vgrind -x index
  44.  
  45.      Normally _c_t_a_g_s places the tag descriptions in a file called
  46.      _t_a_g_s; this may be overridden with the --ff option.
  47.  
  48.      Files whose names end in ..cc or ..hh are assumed to be C source
  49.      files and are searched for C style routine and macro defini-
  50.      tions.  Files whose names end in ..yy are assumed to be YACC
  51.      source files.  Files whose names end in ..ll are assumed to be
  52.      lisp files if their first non-blank character is `;', `(',
  53.      or `[', otherwise, they are treated as lex files.  Other
  54.      files are first examined to see if they contain any Pascal
  55.      or Fortran routine definitions, and, if not, are searched
  56.      for C style definitions.
  57.  
  58.      Other options are:
  59.  
  60.  
  61.  
  62.  
  63. Sprite v1.0              March 16, 1987                         1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. CTAGS                     User Commands                     CTAGS
  71.  
  72.  
  73.  
  74.      --FF   use forward searching patterns (/.../) (the default).
  75.  
  76.      --BB   use backward searching patterns (?...?).
  77.  
  78.      --aa   append to _t_a_g_s file.
  79.  
  80.      --dd   create tags for #_d_e_f_i_n_e_s that don't take arguments;
  81.           #_d_e_f_i_n_e_s that take arguments are tagged automatically.
  82.  
  83.      --tt   create tags for typedefs, structs, unions, and enums.
  84.  
  85.      --ww   suppress warning diagnostics.
  86.  
  87.      --uu   update the specified files in the _t_a_g_s file, that is,
  88.           all references to them are deleted, and the new values
  89.           are appended to the file.  (Beware: this option is
  90.           implemented in a way which is rather slow; it is usu-
  91.           ally faster to simply rebuild the _t_a_g_s file.)
  92.  
  93.      The tag _m_a_i_n is treated specially in C programs.  The tag
  94.      formed is created by prepending _M to the name of the file,
  95.      with the trailing ..cc and any leading pathname components
  96.      removed.  This makes use of _c_t_a_g_s practical in directories
  97.      with more than one program.
  98.  
  99. FFIILLEESS
  100.      tags      default output tags file
  101.  
  102. DDIIAAGGNNOOSSTTIICCSS
  103.      _C_t_a_g_s exits with a value of 1 if an error occurred, where
  104.      duplicate objects are not considered errors, 0 otherwise.
  105.  
  106. SSEEEE AALLSSOO
  107.      ex(1), vi(1)
  108.  
  109. AAUUTTHHOORR
  110.      Ken Arnold; FORTRAN added by Jim Kleckner; Bill Joy added
  111.      Pascal and --xx, replacing _c_x_r_e_f; C typedefs added by Ed
  112.      Pelegri-Llopart.
  113.  
  114. BBUUGGSS
  115.      Recognition of ffuunnccttiioonnss, ssuubbrroouuttiinneess and pprroocceedduurreess for
  116.      FORTRAN and Pascal is done is a very simpleminded way.  No
  117.      attempt is made to deal with block structure; if you have
  118.      two Pascal procedures in different blocks with the same name
  119.      you lose.  _C_t_a_g_s doesn't understand about Pascal types.
  120.  
  121.      The method of deciding whether to look for C, Pascal or FOR-
  122.      TRAN functions is a hack.
  123.  
  124.      _C_t_a_g_s relies on the input being well formed, and any syntac-
  125.      tical errors will completely confuse it.  It also finds some
  126.  
  127.  
  128.  
  129. Sprite v1.0              March 16, 1987                         2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. CTAGS                     User Commands                     CTAGS
  137.  
  138.  
  139.  
  140.      legal syntax confusing; for example, as it doesn't under-
  141.      stand #_i_f_d_e_f's, (incidentally, that's a feature, not a bug)
  142.      any code with unbalanced braces inside #_i_f_d_e_f's will cause
  143.      it to become somewhat disoriented.  In a similar fashion,
  144.      multiple line changes within a definition will cause it to
  145.      enter the last line of the object, rather than the first, as
  146.      the searching pattern.  The last line of multiple line
  147.      _t_y_p_e_d_e_f's will similarly be noted.
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195. Sprite v1.0              March 16, 1987                         3
  196.  
  197.  
  198.  
  199.